<template>
	<view>
		<view class="list">
			<u-radio-group v-model="store_id" activeColor="#010101" wrap>
				<view class="type-item" v-for="(item, index) in storeList" :key="index">
					<u-radio shape="circle" iconSize="30" :name="item.id" labelWidth="100%">
						<view class="item-left u-flex u-col-center u-m-l-30">
							<view class="store-left">
								<image style="width: 200rpx;height: 200rpx;" :src="item.image_first"></image>
							</view>
							<view class="store-zhong">
								<view>{{item.name}}</view>
								<view>{{item.desc}}</view>
								<view><text>{{item.province_name}} {{item.city_name}} {{item.area_name}}</text></view>
							</view>
						</view>
					</u-radio>
				</view>
			</u-radio-group>
			<!-- 	<view class="list-item" v-for="(item,index) in storeList" :key="item.id">
				
				<u-radio-group v-model="selectedWithdrawType" style="width: 100%;"  activeColor="#A36FFF" wrap>
					<view style="width: 100%;padding: 32rpx;display: flex;border-bottom: 1px solid #E5E5E5;">
						<view class="store-left">
							<image style="width: 200rpx;height: 200rpx;" :src="item.image_first"></image>
						</view>
						<view class="store-zhong">
							<view>{{item.name}}</view>
							<view>{{item.desc}}</view>
							<view><text>{{item.province_name}} {{item.city_name}} {{item.area_name}}</text></view>
						</view>
						<view class="store-right">
							<view>
								
									<u-radio shape="circle" iconSize="30" :name="item.id" labelWidth="100%"></u-radio>
							</view>
						</view>
					</view>
				</u-radio-group>
			</view> -->
		</view>

		<view @click="submit()" class="queding">确定</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				store_id: '',
				storeList: [],
			};
		},
		onLoad(options) {
			this.id=options.id
			this.getstorelist()
		},
		methods: {
			getstorelist() {
				let that = this;
				let data = {}
				that.$https('sendgoods.storesList', data, '请求中...').then(res => {
					if (res.code === 1) {
						console.log('res', res)
						that.storeList = res.data.data
						if(that.storeList.length>0){
							that.store_id=that.storeList[0].id
						}
					}
				});
			},
			submit(){
				let that=this
				console.log('11',this.store_id)
			 this.$Router.push({
			 	path: "/pages/index/courtesy/date",
			 	query: {
					store_id:that.store_id,
					id:that.id
				}
			 });
			}
		}
	}
</script>
<style>
	page {
		background: #ffffff;
	}
</style>
<style lang="scss">
	.store-left {
		flex: 1;
	}

	.store-zhong {
		flex: 1.5;
	}

	.queding {
		min-height: 90rpx;
		margin: 0 40rpx 10rpx;
		width: calc(100% - 80rpx);
		position: fixed;
		bottom: 32rpx;
		z-index: 999;
		background: #010101;
		border-radius: 36rpx;
		color: #ffffff;
		justify-content: center;
		display: flex;
		align-items: center;
	}

	.type-item {
		height: 240rpx;
		border-bottom: 1px solid #E5E5E5;
		margin-left: 32rpx;
		margin-right: 32rpx;
		margin-top: 32rpx;
	}

</style>
